package project_cache

import (
	"context"
	"service/ctrl"
	"service/model/mod"

	gpb "gitee.com/cloudapex/protos/project_cache/pb"
	"google.golang.org/grpc"
)

var ProjectConfigCache projectCnofigCache

func init() {
	ctrl.GCon.RegistClienter(mod.GCONN_HR_CACHE, func(c *grpc.ClientConn) {
		ProjectConfigCache.cli = gpb.NewCrmProjectServerClient(c)
	})
}

type projectCnofigCache struct {
	cli gpb.CrmProjectServerClient
}

//说明：获取项目名称
func (this *projectCnofigCache) CrmProjectConfigGet(ctx context.Context, in *gpb.CrmProjectInfoReq) (*gpb.CrmProjectInfoRes, error) {
	return this.cli.CrmProjectCacheGet(ctx, in)
}
